/**
 * 安装设置
 */
export class InstallConfig {
    /**
     * 显示名称
     */
    public ShowName: boolean = false;
    /**
     * 显示步骤
     */
    public ShowStep: boolean = false;
    /**
     * 显示说明
     */
    public ShowTip: boolean = false;
}

/**
 * 标定设置
 */
export class CalibrationConfig {
    /**
     * 坐标原点设置
     */
    public AxisCenter: number = 0;

    /**
     * 坐标
     */
    public Position: Array<number> = [0, 0, 0];

    /**
     * 角度
     */
    public Angle: Array<number> = [0, 0, 0];
}

/**
 * 协议设置
 */
export class ProtocolConfig {
    /**
     * 协议Id数组
     */
    public ProtocolIds: Array<number> = [];
    /**
     * 物体识别数量 - 不为零
     */
    public Count: number = 1;
}

/**
 * 车道线识别设置
 */
export class LaneDetectConfig {
    public Id: number = 0;
    public Left: Array<number> = [];
    public Right: Array<number> = [];
}

export default class SettingsConfig {
    public Title: string;
    public Section: string;
    public System: string;
    public Type: string;
    public Weight: number;

    public Settings: InstallConfig | CalibrationConfig | ProtocolConfig | LaneDetectConfig | {} = {};

    public ContentTemplate: string;

    public ModuleOptions: Array<string>;
    public SystemOptions: Array<string>;
    public TypeOptions: Array<string>;

    constructor(title: string = '', section: string = '', system: string = '', type: string = '', weight: number = 0, contentTemplate: string = '', moduleOptions: Array<string> = [], systemOptions: Array<string> = [], typeOptions: Array<string> = []) {
        this.Title = title;
        this.Section = section;
        this.System = system;
        this.Type = type;
        this.Weight = weight;
        this.ContentTemplate = contentTemplate;
        this.ModuleOptions = moduleOptions;
        this.SystemOptions = systemOptions;
        this.TypeOptions = typeOptions;

    }
}

